package com.pk.android.model;

import java.util.Calendar;
import org.joda.time.DateTime;
import org.joda.time.Period;

public class Player  extends BaseItem{
	private String mName;
	private double mMarketValue;
	private Position mCurrentPosition;
	private Calendar mBirthDate;
	private double mProtathlitisValue;
	private TeamOfficial mCurrentTeam;
	private String mNationality;
	private double mHeight;

	public Player()
	{
		
	}
	
	public Player(String name)
	{
		this.setName(name);
	}
	
	public String getName() {
		return mName;
	}
	public void setName(String name) {
		mName = name;
	}
	public double getMarketValue() {
		return mMarketValue;
	}
	public void setMarketValue(double marketValue) {
		mMarketValue = marketValue;
	}
	public Position getCurrentPosition() {
		return mCurrentPosition;
	}
	public void setCurrentPosition(Position currentPosition) {
		mCurrentPosition = currentPosition;
	}
	public Calendar getBirthDate() {
		return mBirthDate;
	}
	public void setBirthDate(Calendar birthDate) {
		mBirthDate = birthDate;
	}
	
	public int getAge() {
		DateTime START_DT = (getBirthDate()==null)?null:new DateTime(getBirthDate());
		DateTime END_DT = DateTime.now();
		
		Period period = new Period(START_DT, END_DT);
		
		return period.getYears();
	}
	
	public double getProtathlitisValue() {
		return mProtathlitisValue;
	}
	public void setProtathlitisValue(double protathlitisValue) {
		mProtathlitisValue = protathlitisValue;
	}
	public TeamOfficial getCurrentTeam() {
		return mCurrentTeam;
	}
	public void setCurrentTeam(TeamOfficial currentTeam) {
		mCurrentTeam = currentTeam;
	}
	
	public String getNationality() {
		return mNationality;
	}

	public void setNationality(String nationality) {
		this.mNationality = nationality;
	}

	public double getHeight() {
		return mHeight;
	}

	public void setHeight(double height) {
		this.mHeight = height;
	}

	
}
